#include "stdafx.h"
#define MAX 20
void reverse_array(int a[],int cnt);
void main(){
    int a[MAX];
	int count,i;
	printf("qingshuru:(xiaoyu%d):\n",MAX);
	scanf("%d",&count);
	printf("yicishurushuzi:\n");
	for(i=1;i<count;i++);{
		scanf("%d\n",&a[i-1]);
	}
	reverse_array(a,count);
	printf("zhuanhuanhoushunxu:\n");
	for(i=1;i<=count;i++){
		printf("%d",a[i-1]);
	}
}
void inplace_swap(int *x,int *y){
	*y=*x^*y;
	*x=*x^*y;
	*y=*x^*y;
}
void reverse_array(int a[],int cnt){
	int first,last;
	for(first=0,last=cnt-1;
	    first < last;
	    first++,last--;
	  inplace_swap(&a[first],&a[last]);
}

